import {
  Body,
  Controller,
  Delete,
  Get,
  Param, ParseUUIDPipe,
  Patch,
  Post,
  Query,
  UseGuards,
} from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import {
  BrandAdminCreateDto,
  BrandAdminIndexDto,
  BrandAdminUpdateDto,
} from './brand.dto';
import { BrandService } from './brand.service';
import { getPager } from "@/common/pager-response";
import { AdminAuthGuard } from "@/common/auth/admin-auth.guard";
import { BrandAdminIndexResult, BrandAllResult } from "@/module/brand/brand.result";
import { PageResult } from "common/interface";

@Controller('/v1/brands')
@ApiTags('Brand')
export class BrandV1Controller {
  constructor(private readonly brandService: BrandService) {
  }

  @Get('/all')
  @ApiOperation({ summary: '全部' })
  @ApiOkResponse({ type: BrandAllResult, isArray: true })
  async all(): Promise<BrandAllResult[]> {
    const res = await this.brandService.all();
    return res;
  }
}
